package cn.yunhe.control;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


@WebServlet("/GetBlankInfoServlet")
public class GetBlankInfoServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        String bId = request.getParameter("bId");
        String bName = request.getParameter("bName");
        if (bId != null && bName != null) {
            request.setAttribute("bId",bId);
            request.setAttribute("bName",bName);
            request.getRequestDispatcher("addTopic.jsp").forward(request,response);
        }else {
            request.setAttribute("result","板块信息不存在!!");
            response.sendRedirect("addTopicOnblank.jsp");
        }
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doGet(req, resp);
    }
}

